<div class="main-title no-border">
	<h1>Bulk Create Reject Details</h1>
</div>
<div class="flat_area">
    <div id="ps-payment-voucher-create" class="grid_16 relative">
		<?php if (!empty($courseAttendences)): ?>
			<?php
			$form = $this->beginWidget('PsActiveForm', array(
				'id' => 'update-course-attendence-form',
				'enableAjaxValidation' => false,
				'enableClientValidation' => true,
				'clientOptions' => array(
					'validationDelay' => 200,
					'inputContainer' => 'tr',
					'validateOnSubmit' => true,
					'validateOnChange' => false,
				)
					));
			?>
			<div class="grid_16">
				<?php foreach ($courseAttendences as $i => $courseAttendence): ?>
					<?php
					$this->renderPartial('_reject_details_form', array(
						'index' => $i,
						'form' => $form,
						'courseAttendence' => $courseAttendence
					));
					?>
				<?php endforeach; ?>
			</div>
			<div class="grid_16 relative">
				<?php echo CHtml::hiddenField('bulk_action', $_POST['bulk_action']); ?>
				<a class="link" href="<?php echo $this->createUrl('/cpd/course/courseAttendenceAccess'); ?>">Cancel</a>
				&nbsp;or 
				<button type="submit" class="link-button green no-margin with-icon" id="btnFinish">
					<span>Update Reject Details</span>
				</button>
			</div>
			<?php $this->endWidget(); ?>
		<?php endif; ?>

    </div>
</div>